package com.zhongketech.sunflower.main.fragment;

import com.zhongketech.sunflower.FullscreenActivity;
import com.zhongketech.sunflower.R;
import com.zhongketech.sunflower.StartAppActivity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;


public class FragmentMe extends BaseFragment {

	protected View mMainView;
	protected Context context = null;
	protected ImageView avatarImageView = null;
	
	public FragmentMe() {
		super();
	}

	@Override
	public void onAttach(Activity activity) {
		super.onAttach(activity);
		context = activity.getApplicationContext();
	}


	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		//return super.onCreateView(inflater, container, savedInstanceState);

		mMainView = inflater.inflate(R.layout.fragment_me, container, false);
		avatarImageView = (ImageView) mMainView.findViewById(R.id.me_avatar);
		avatarImageView.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent();  
				intent.setClass(context, FullscreenActivity.class);  
				startActivity(intent); 
			}
		});

		return mMainView;
	}

}
